//轮播图
$(function () {
    var mySwiper = $('.swiper-bb')
        .swiper({
            autoplay: 3000,
            loop: true,
            pagination: '.swiper-pagination',
            nextButton: '.swiper-button-next',
            prevButton: '.swiper-button-prev',
            direction: 'horizontal',
        })
})
//原生轮播图

//划入显示隐藏
$(function () {
    $("#huaru").mouseover(function () {
        $("#product").stop().fadeIn();
    })
    $("#huaru").mouseout(function () {
        $("#product").stop().fadeOut();
    })
    var mySwiper = $('.swiper-dd')
        .swiper({
            autoplay: 0,
            loop: true,
            nextButton: '.swiper-button-next',
            prevButton: '.swiper-button-prev',
            direction: 'horizontal',
        })
})

//轮播图
var mySwiper = new Swiper('.swiper', {
    direction: 'horizontal',
    loop: true, // 循环模式选项
    autoplay: {
        delay: 3000,
        disableOnInteraction: false, // 手动切换之后继续自动轮播
    },

    // 如果需要分页器
    pagination: {
        el: '.swiper-pagination',
        clickable: true,
        bulletClass: 'my-bullet',
    },
})
//下拉列表
$(function () {
    $("#huaru").mouseover(function () {
        $("#product").stop().show();
    })
    $("#huaru").mouseout(function () {
        $("#product").stop().hide();
    })
})
//图片显示特效
$(function () {
    $(".hhide").on("mouseover", "li", function () {
        $(this).children(".content-hide").show()
    })
    $(".hhide").on("mouseout", "li", function () {
        $(this).children(".content-hide").hide()
    })
})

//哆哆说轮播
function num() {
    document.getElementById("show").scrollLeft += 5;
    if (document.getElementById("show").scrollLeft >= 1250) {
        document.getElementById("con").appendChild(document.getElementById("con").firstElementChild);
        document.getElementById("show").scrollLeft = 0;
        stardBanner();
        clearInterval(ban);
    }
}
var st;
var ban;
function stardBanner() {
    st = setTimeout(function () {
        ban = setInterval(num, 100);
    }, 2000)
}
stardBanner();
